package com.xxxy.Controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
//支持配置自动更新
@RefreshScope
public class PriorityTestController {
   // 错误写法 - 需要修改
//@Value("${sercive.config}")
//private String configValue;

// 正确写法
@Value("${priority.test}")
private String priority;


    @GetMapping("/test")
    public String getConfig() {
        return priority;
    }
}
